﻿if exists (select * from sysobjects where name like N'%sp_DMLoaiThue_Insert%')
	drop proc sp_DMLoaiThue_Insert
go
create proc sp_DMLoaiThue_Insert
	@MaCode varchar(50) = null,
	@TenLoaiThue nvarchar(50) = null,
	@IsUse bit = null,
	@CreateBy int = null	
as
begin
	if not exists (select * from DMLoaiThue where MaCode = @MaCode)
	begin
		insert into DMLoaiThue (MaCode, TenLoaiThue, IsUse, CreateBy)
		values (@MaCode, @TenLoaiThue, @IsUse, @CreateBy)
		return 1
	end
	else
	begin
		return 0
	end
end